<template>
  <el-container>
    <el-header class="header">
      <div class="title">管理员后台</div>
      <div class="avatar">
        <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar>
      </div>
    </el-header>
    <el-container class="main">
      <el-aside width="240px"><Menu v-bind:user-type="2"/></el-aside>
      <el-main>
        <el-card class="box-card">
          <div class="mainPage">
            <router-view></router-view>
          </div>
        </el-card>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import Menu from "@/components/Menu.vue";

export default {
  name: "index",
  components: {Menu}
}
</script>

<style lang="less"  scoped>
.el-header, .el-footer {
  background-color: #545c64;
  color: #fff;
  text-align: left;
  line-height: 60px;
  padding: 0px;
  .title{
    float: left;
    width: 240px;
    margin: 0px;
    text-align: center;
  }
  .avatar{
    float: right;
    padding:10px 20px;
  }
}

.el-aside {
  background-color: #D3DCE6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.mainPage{
  padding: 20px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>